<?php
namespace ImiApp\Module\Member\Model\Base;

use Imi\Model\Model;
use Imi\Model\Annotation\DDL;
use Imi\Model\Annotation\Table;
use Imi\Model\Annotation\Column;
use Imi\Model\Annotation\Entity;

/**
 * 分类表 基类
 * @Entity
 * @Table(name="sc_category", id={"id"})
 * @DDL("CREATE TABLE `sc_category` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `pid` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '父ID',
  `type` varchar(30) COLLATE utf8mb4_unicode_ci DEFAULT '' COMMENT '栏目类型',
  `name` varchar(30) COLLATE utf8mb4_unicode_ci DEFAULT '',
  `nickname` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT '',
  `flag` set('hot','index','recommend') COLLATE utf8mb4_unicode_ci DEFAULT '',
  `image` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT '' COMMENT '图片',
  `keywords` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT '' COMMENT '关键字',
  `description` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT '' COMMENT '描述',
  `diyname` varchar(30) COLLATE utf8mb4_unicode_ci DEFAULT '' COMMENT '自定义名称',
  `createtime` int(10) DEFAULT NULL COMMENT '创建时间',
  `updatetime` int(10) DEFAULT NULL COMMENT '更新时间',
  `weigh` int(10) NOT NULL DEFAULT '0' COMMENT '权重',
  `status` varchar(30) COLLATE utf8mb4_unicode_ci DEFAULT '' COMMENT '状态',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `weigh` (`weigh`,`id`) USING BTREE,
  KEY `pid` (`pid`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=COMPACT COMMENT='分类表'")
 * @property int $id 
 * @property int $pid 父ID
 * @property string $type 栏目类型
 * @property string $name 
 * @property string $nickname 
 * @property string $flag 
 * @property string $image 图片
 * @property string $keywords 关键字
 * @property string $description 描述
 * @property string $diyname 自定义名称
 * @property int $createtime 创建时间
 * @property int $updatetime 更新时间
 * @property int $weigh 权重
 * @property string $status 状态
 */
abstract class ScCategoryBase extends Model
{
    /**
     * id
     * @Column(name="id", type="int", length=10, accuracy=0, nullable=false, default="", isPrimaryKey=true, primaryKeyIndex=0, isAutoIncrement=true)
     * @var int
     */
    protected $id;

    /**
     * 获取 id
     *
     * @return int
     */ 
    public function getId()
    {
        return $this->id;
    }

    /**
     * 赋值 id
     * @param int $id id
     * @return static
     */ 
    public function setId($id)
    {
        $this->id = $id;
        return $this;
    }

    /**
     * 父ID
     * pid
     * @Column(name="pid", type="int", length=10, accuracy=0, nullable=false, default="0", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
     * @var int
     */
    protected $pid;

    /**
     * 获取 pid - 父ID
     *
     * @return int
     */ 
    public function getPid()
    {
        return $this->pid;
    }

    /**
     * 赋值 pid - 父ID
     * @param int $pid pid
     * @return static
     */ 
    public function setPid($pid)
    {
        $this->pid = $pid;
        return $this;
    }

    /**
     * 栏目类型
     * type
     * @Column(name="type", type="varchar", length=30, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
     * @var string
     */
    protected $type;

    /**
     * 获取 type - 栏目类型
     *
     * @return string
     */ 
    public function getType()
    {
        return $this->type;
    }

    /**
     * 赋值 type - 栏目类型
     * @param string $type type
     * @return static
     */ 
    public function setType($type)
    {
        $this->type = $type;
        return $this;
    }

    /**
     * name
     * @Column(name="name", type="varchar", length=30, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
     * @var string
     */
    protected $name;

    /**
     * 获取 name
     *
     * @return string
     */ 
    public function getName()
    {
        return $this->name;
    }

    /**
     * 赋值 name
     * @param string $name name
     * @return static
     */ 
    public function setName($name)
    {
        $this->name = $name;
        return $this;
    }

    /**
     * nickname
     * @Column(name="nickname", type="varchar", length=50, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
     * @var string
     */
    protected $nickname;

    /**
     * 获取 nickname
     *
     * @return string
     */ 
    public function getNickname()
    {
        return $this->nickname;
    }

    /**
     * 赋值 nickname
     * @param string $nickname nickname
     * @return static
     */ 
    public function setNickname($nickname)
    {
        $this->nickname = $nickname;
        return $this;
    }

    /**
     * flag
     * @Column(name="flag", type="set", length=0, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
     * @var string
     */
    protected $flag;

    /**
     * 获取 flag
     *
     * @return string
     */ 
    public function getFlag()
    {
        return $this->flag;
    }

    /**
     * 赋值 flag
     * @param string $flag flag
     * @return static
     */ 
    public function setFlag($flag)
    {
        $this->flag = $flag;
        return $this;
    }

    /**
     * 图片
     * image
     * @Column(name="image", type="varchar", length=100, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
     * @var string
     */
    protected $image;

    /**
     * 获取 image - 图片
     *
     * @return string
     */ 
    public function getImage()
    {
        return $this->image;
    }

    /**
     * 赋值 image - 图片
     * @param string $image image
     * @return static
     */ 
    public function setImage($image)
    {
        $this->image = $image;
        return $this;
    }

    /**
     * 关键字
     * keywords
     * @Column(name="keywords", type="varchar", length=255, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
     * @var string
     */
    protected $keywords;

    /**
     * 获取 keywords - 关键字
     *
     * @return string
     */ 
    public function getKeywords()
    {
        return $this->keywords;
    }

    /**
     * 赋值 keywords - 关键字
     * @param string $keywords keywords
     * @return static
     */ 
    public function setKeywords($keywords)
    {
        $this->keywords = $keywords;
        return $this;
    }

    /**
     * 描述
     * description
     * @Column(name="description", type="varchar", length=255, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
     * @var string
     */
    protected $description;

    /**
     * 获取 description - 描述
     *
     * @return string
     */ 
    public function getDescription()
    {
        return $this->description;
    }

    /**
     * 赋值 description - 描述
     * @param string $description description
     * @return static
     */ 
    public function setDescription($description)
    {
        $this->description = $description;
        return $this;
    }

    /**
     * 自定义名称
     * diyname
     * @Column(name="diyname", type="varchar", length=30, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
     * @var string
     */
    protected $diyname;

    /**
     * 获取 diyname - 自定义名称
     *
     * @return string
     */ 
    public function getDiyname()
    {
        return $this->diyname;
    }

    /**
     * 赋值 diyname - 自定义名称
     * @param string $diyname diyname
     * @return static
     */ 
    public function setDiyname($diyname)
    {
        $this->diyname = $diyname;
        return $this;
    }

    /**
     * 创建时间
     * createtime
     * @Column(name="createtime", type="int", length=10, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
     * @var int
     */
    protected $createtime;

    /**
     * 获取 createtime - 创建时间
     *
     * @return int
     */ 
    public function getCreatetime()
    {
        return $this->createtime;
    }

    /**
     * 赋值 createtime - 创建时间
     * @param int $createtime createtime
     * @return static
     */ 
    public function setCreatetime($createtime)
    {
        $this->createtime = $createtime;
        return $this;
    }

    /**
     * 更新时间
     * updatetime
     * @Column(name="updatetime", type="int", length=10, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
     * @var int
     */
    protected $updatetime;

    /**
     * 获取 updatetime - 更新时间
     *
     * @return int
     */ 
    public function getUpdatetime()
    {
        return $this->updatetime;
    }

    /**
     * 赋值 updatetime - 更新时间
     * @param int $updatetime updatetime
     * @return static
     */ 
    public function setUpdatetime($updatetime)
    {
        $this->updatetime = $updatetime;
        return $this;
    }

    /**
     * 权重
     * weigh
     * @Column(name="weigh", type="int", length=10, accuracy=0, nullable=false, default="0", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
     * @var int
     */
    protected $weigh;

    /**
     * 获取 weigh - 权重
     *
     * @return int
     */ 
    public function getWeigh()
    {
        return $this->weigh;
    }

    /**
     * 赋值 weigh - 权重
     * @param int $weigh weigh
     * @return static
     */ 
    public function setWeigh($weigh)
    {
        $this->weigh = $weigh;
        return $this;
    }

    /**
     * 状态
     * status
     * @Column(name="status", type="varchar", length=30, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
     * @var string
     */
    protected $status;

    /**
     * 获取 status - 状态
     *
     * @return string
     */ 
    public function getStatus()
    {
        return $this->status;
    }

    /**
     * 赋值 status - 状态
     * @param string $status status
     * @return static
     */ 
    public function setStatus($status)
    {
        $this->status = $status;
        return $this;
    }

}
